"""
    Controller for `bond_record` table.
"""

from mnemoply.controllers.lookup import LookupController, TableCol, TableLookupDataSource

class BondRecordController(LookupController):
    lookup_columns = [
        TableCol(name='num_box_of_collection', caption=_("Number box of collection")),
        TableCol(name='office', caption=_("Office")),
        TableCol(name='date_of_begin', caption=_("Date of begin")),
        TableCol(name='date_of_collection', caption=_("Date of collection")),
        TableCol(name='banknotes_amount', caption=_("Bank notes amount")),
        TableCol(name='total', caption=_("Total sum")),
        TableCol(name='bond10', caption=_("Bond 10"), hidden=True),
        TableCol(name='bond50', caption=_("Bond 50"), hidden=True),
        TableCol(name='bond100', caption=_("Bond 100"), hidden=True),
        TableCol(name='bond500', caption=_("Bond 500"), hidden=True),
        TableCol(name='bond1000', caption=_("Bond 1000"), hidden=True),
        TableCol(name='bond5000', caption=_("Bond 5000"), hidden=True),
        ]

    def __init__(self):
        LookupController.__init__(self,
            data_source=TableLookupDataSource('bond_record_lookup'),
            columns=self.lookup_columns,
            title=_("Bond records"),
        )

exposed = BondRecordController()
